<template>
    <div class="userDetail-list">
        <el-card class="box-card">
            <userTable :countParams="countParams" />
        </el-card>
        <el-tabs type="border-card" v-model="currentTab">
            <el-tab-pane label="收益" name="1">
                <earnings :tabIndex="currentTab" />
            </el-tab-pane>
            <el-tab-pane :label="`发出评价(${countList.sendCommentCount || 0})`" name="2">
                <sendEvaluate :tabIndex="currentTab" />
            </el-tab-pane>
            <el-tab-pane :label="`收到评价(${countList.receiveCommentCount || 0})`" name="3">
                <getEvaluate :tabIndex="currentTab" />
            </el-tab-pane>
            <el-tab-pane :label="`组队卡(${countList.historyConditionCount || 0})`" name="4">
                <teamCard :tabIndex="currentTab" />
            </el-tab-pane>
            <el-tab-pane :label="`大神局胜率(${countList.kingPercent || 0}%)`" name="5">
                <legendaryWin :tabIndex="currentTab" />
            </el-tab-pane>
            <el-tab-pane :label="`成长记录`" name="6">
                <growupLog :tabIndex="currentTab" />
            </el-tab-pane>
            <el-tab-pane :label="`大神接单明细`" name="7">
                <legendaryOrder :tabIndex="currentTab" />
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
import userTable from './component/userTable'
import earnings from './component/earnings'
import sendEvaluate from './component/sendEvaluate'
import getEvaluate from './component/getEvaluate'
import teamCard from './component/teamCard'
import legendaryWin from './component/legendaryWin'
import growupLog from './component/growupLog'
import legendaryOrder from './component/legendaryOrder'

export default {
    components: {
        userTable, earnings, sendEvaluate, getEvaluate, teamCard, legendaryWin, growupLog, legendaryOrder
    },
    data () {
        return {
            currentTab: '1',
            countList: {}
        }
    },
    methods: {
        countParams (params) {
            this.countList = params
        }
    }
}
</script>

<style lang="scss" scoped>
    .userDetail-list {
        .box-card {
            margin-bottom: 20px;
        }
    }
</style>
